@extends('LaravelExtend::app')

@section('stylesheet')
    @parent
    <link href="{{ asset('_account/app/css/app.css') }}" rel="stylesheet">
@endsection

@section('page-header')
    <el-row type="flex" justify="space-between" class="overflow-hidden">
        <h1 class="logo-wrapper">
            <a class="text-dark" href="/">{{ config('app.name', '') }}</a>
        </h1>
        <div >

            <el-row type="flex" justify="end">
                <menu-nav mode="auto" state-change-on="md" data-menu-key="main">

                    <template v-slot:append>
                        <el-menu-item class="px-0" index="-1"><el-divider direction="vertical"></el-divider></el-menu-item>

                        {{--@auth
                            <el-submenu class="px-1 " index="web.console.users.*">
                                <template slot="title">
                                    <span  class="text-success">{{authService()::AuthenticatedUser('name','web')}}</span>
                                </template>
                                <el-menu-item class="px-1 " index="web.console.*"><a  class="small" href="{{route('web.console.home')}}">控制台</a></el-menu-item>
                                <el-menu-item class="px-1 " index="web.laravel-extend.services.auth.logout"><a  class="small" href="{{route('web.laravel-extend.services.auth.logout',['guard'=>'web'])}}">退出登录</a></el-menu-item>
                            </el-submenu>

                        @else
                        <el-menu-item class="px-1 " index="web.laravel-extend.services.auth.login"><a  class="small" href="{{route('web.laravel-extend.services.auth.login',['guard'=>'web'])}}">登录</a></el-menu-item>

                        @if(authService()::GetGuardProviderConfig('web','allow_register') && Route::has('web.laravel-extend.services.auth.register'))
                        <el-menu-item class="px-1 " index="web.laravel-extend.services.auth.logout"><a class="small" href="{{route('web.laravel-extend.services.auth.register',['guard'=>'web'])}}">注册</a></el-menu-item>
                        @endif
                        @endauth--}}
                    </template>

                </menu-nav>

                <menu-auth
                    auth-guard="web"
                    v-on:logined="function(u,t){this.location.href = '{{route('web.auth.login-success')}}'}"
                >

                    <template v-slot:logined>
                        <el-menu-item class="px-1 " index="web.console.*"><a  class="small" href="{{route('web.console.home')}}">控制台</a></el-menu-item>

                    </template>
                </menu-auth>
            </el-row>
        </div>
    </el-row>
@endsection



@section('footer-script')
    @parent

    <script src="{{ asset('_account/app/js/manifest.js') }}"></script>
    <script src="{{ asset('_account/app/js/vendor.js') }}"></script>
    <script src="{{ asset('_account/app/js/app.js') }}"></script>

   {{-- @include('LaravelExtend::file_service')
    @include('LaravelExtend::editor')--}}
@endsection


